// Fill out your copyright notice in the Description page of Project Settings.
#include "GConfigFunctionLibrary.h"




FString UGConfigFunctionLibrary::GetDBServerIP()
{
	FString IP;
	GConfig->GetString(TEXT("SGame_DB"),TEXT("GameServerIP"),IP,FPaths::SourceConfigDir()/"SGameServer.ini");
	return IP;
}

FString UGConfigFunctionLibrary::GetDBServerPort()
{
	FString IP;
	GConfig->GetString(TEXT("SGame_DB"), TEXT("Port"), IP, FPaths::SourceConfigDir() / "SGameServer.ini");
	return IP;
}

FString UGConfigFunctionLibrary::GetGameLoginServer()
{
	FString IP;
	GConfig->GetString(TEXT("SGame_Login"), TEXT("GameLoginIP"), IP, FPaths::SourceConfigDir() / "SGameServer.ini");
	return IP;
}

FString UGConfigFunctionLibrary::GetGameLoginPort()
{
	FString IP;
	GConfig->GetString(TEXT("SGame_Login"), TEXT("Port"), IP, FPaths::SourceConfigDir() / "SGameServer.ini");
	return IP;
}

FString UGConfigFunctionLibrary::GetGameServer()
{
	FString IP;
	GConfig->GetString(TEXT("SGame_Game"), TEXT("GameServer"), IP, FPaths::SourceConfigDir() / "SGameServer.ini");
	return IP;
}

FString UGConfigFunctionLibrary::GetGamePort()
{
	FString IP;
	GConfig->GetString(TEXT("SGame_Game"), TEXT("Port"), IP, FPaths::SourceConfigDir() / "SGameServer.ini");
	return IP;
}
